﻿/// <reference path="../../Service/HighScores/Client/highscores_api.js" /> 

vipgames.api.register(
	{
	    game_id: 'my-company.my-gameid',
	    load: function (api) {
	        // start loading the game
	        var scores = 0;
	        api.game_load(
				{
				    getScores: function () {
				        return scores;
				    },
                    stop: function() {
                        api.game_end();
                    },
				    unload: function () {
				        //dispose the game 
				    }
				}, function () {
				    // do something after game loaded
				    alert('OK to start the game');
				    api.game_start(function () {
				        alert('playing the game...\n' 
                            + 'OK to get 10 scores!');
				        scores += 10;
				        alert('OK to end the game');
				        api.game_end();
				    });
				}
			);
	    }
	}
);
